package com.snake.springboot.authority.dao.mybatis.mappers;

import com.snake.springboot.authority.dao.mybatis.entity.AuthMenuTreeDO;
import com.snake.springboot.authority.dao.mybatis.entity.AuthOperatorRoleDO;
import com.snake.springboot.authority.dao.mybatis.entity.AuthOperatorRoleExtDO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Set;

@Mapper
public interface AuthOperatorRoleMapper {

    int delete(AuthOperatorRoleDO key);

    int insert(AuthOperatorRoleDO record);

    int insertBatch(List<AuthOperatorRoleDO> records);

    int update(AuthOperatorRoleDO record);

    List<AuthOperatorRoleDO> findByCondition(AuthOperatorRoleDO condition);

    List<AuthOperatorRoleExtDO> findRoleCodes(String operatorId);

    List<AuthMenuTreeDO> findMenuTree(@Param("operatorId") String operatorId, @Param("systemId") String systemId);

    List<AuthMenuTreeDO> findMenuTreeByPerms(@Param("perms") Set<String> perms, @Param("systemId") String systemId);

}